import {ajax_user} from './ajax';

export function getCfg(cb){
    ajax_user("u/skill/cfg")
    .then(responseJson => {
        if(responseJson.result == 1){
            cb(responseJson.data);
        }
      })
}

export function set(skill, cb){
    let skill_str = skill.join(",");
    ajax_user("u/skill/set", {skills: skill_str})
    .then(responseJson => {
        if(responseJson.result == 1){
            cb();
        }
      })
}